package com.sdses.weather.config.exception;

import com.sdses.weather.common.error.ErrCode;
import lombok.Data;

@Data
public class BusinessException extends RuntimeException {
    private String code = "";
    private String msg = "";

    public BusinessException(String code, String msg) {
        super(msg);
        this.code = code;
        this.msg = msg;
    }

    public BusinessException(String msg) {
        super(msg);
        this.code = ErrCode.FAILED.getCode();
        this.msg = msg;
    }
}
